package com.atguigu.paymentdemo.controller;

import com.atguigu.paymentdemo.config.WxPayConfig;
import com.atguigu.paymentdemo.vo.R;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "测试控制器")
@RequestMapping("/api/test")
@RestController
public class TestController {
    @Resource
    WxPayConfig wxPayConfig;

    @GetMapping("/get-wx-pay-config")
    public R test(){
        return new R().ok().data("id",wxPayConfig.getAppid());
    }
}
